package com.kasax.android.arch.utils;

import com.google.gson.Gson;

import java.lang.reflect.Type;

public class GsonUtils {
    private static Gson gson;

    static {
        gson = new Gson();
    }

    public static String toJson(Object object) {
        return gson.toJson(object);
    }

    public static <T> T fromJson(String src, Type typeOfSrc) {
        return gson.fromJson(src, typeOfSrc);

    }

}
